/**
 * Created by WYH on 17/3/17.
 */
require.config({
    paths: {
        "jquery": "../../../lib/jquery-3.0.0"
    }
});

require(["jquery"], function ($) {


    loadTableList();



    function loadTableList() {
        var repairList = getRepairList();
        var repairHtml = $(".content-form-list").html();
        repairList.forEach(function (repairItem) {
            var repairItemHtml = repairHtml.replace(/name/, repairItem.name).
                replace(/time/, repairItem.time).
                replace(/project/, repairItem.project).
                replace(/phone/, repairItem.phone).
                replace(/position/, repairItem.position).
                replace(/money/, repairItem.money).
                replace(/status/, repairItem.status);
            $(".content-form-body").append(repairItemHtml);
        })
    }


    function getRepairList() {
        return [
            {
                name: '张小花',
                time: "2017-02-11",
                project: '水管维修',
                phone: '15733108692',
                position: '产品技术',
                money: '12.00',
                status: '已绑定'
            },
            {
                name: '张小花',
                time: "2017-02-11",
                project: '水管维修',
                phone: '15733108692',
                position: '产品技术',
                money: '12.00',
                status: '已绑定'
            },
            {
                name: '张小花',
                time: "2017-02-11",
                project: '水管维修',
                phone: '15733108692',
                position: '产品技术',
                money: '12.00',
                status: '已绑定'
            },
            {
                name: '张小花',
                time: "2017-02-11",
                project: '水管维修',
                phone: '15733108692',
                position: '产品技术',
                money: '12.00',
                status: '已绑定'
            },
            {
                name: '张小花',
                time: "2017-02-11",
                project: '水管维修',
                phone: '15733108692',
                position: '产品技术',
                money: '12.00',
                status: '已绑定'
            }
        ];
    }






});